import {BaseHttpService, HttpCustomConfig} from "../base/base.http.service";
import {Observable} from "rxjs";
import {NzSafeAny} from "ng-zorro-antd/core/types";
import {Injectable} from "@angular/core";

@Injectable({
  providedIn: 'root'
})
export class OrderHttpService {

  constructor(public http: BaseHttpService) {
  }

  public queryCpsOrder(params: NzSafeAny, config: HttpCustomConfig): Observable<NzSafeAny> {
    return this.http.post(this.http.getUrl('/admin/queryCpsOrder', false), params, config);
  }

  public updateCpsOrder(params: NzSafeAny, config: HttpCustomConfig): Observable<NzSafeAny> {
    return this.http.post(this.http.getUrl('/admin/updateCpsOrder', false), params, config);
  }

  public settleCpsOrder(params: NzSafeAny, config: HttpCustomConfig): Observable<NzSafeAny> {
    return this.http.post(this.http.getUrl('/admin/settleCpsOrder', false), params, config);
  }

  public exportCpsOrder(params: NzSafeAny, config: HttpCustomConfig): Observable<NzSafeAny> {
    return this.http.post(this.http.getUrl('/admin/exportCpsOrder', false), params, config);
  }

  public queryRegister(params: NzSafeAny, config: HttpCustomConfig): Observable<NzSafeAny> {
    return this.http.post(this.http.getUrl('https://gateway.arrayconnect.cn/direct/actRegister/queryRegister', true), params, config);
  }

  public exportRegister(params: NzSafeAny, config: HttpCustomConfig): Observable<NzSafeAny> {
    return this.http.post(this.http.getUrl('https://gateway.arrayconnect.cn/direct/actRegister/exportRegister', true), params, config);
  }
}
